<!--
 * @Autor: 张小鹏
 * @Date: 2020-04-22 13:54:16
 * @LastEditors: 张小鹏
 * @LastEditTime: 2020-04-23 10:43:43
 * @description: 
 -->
<!--
 * @Autor: 张小鹏
 * @Date: 2020-04-17 15:50:59
 * @LastEditors: 张小鹏
 * @LastEditTime: 2020-04-17 18:38:57
 * @description: 
 -->
<template>
  <div class="main">
    <el-form :inline="true"  class="demo-form-inline">
      <el-form-item label="省份">
       <!-- <org-select size="medium" @change="handleProvSelect" placeholder="选择省份" :regionSelect="['省份']"></org-select>-->
        <tree-select ref="treeselectwarp"  :data="treedata"
                       show-checkbox
                       node-key="id"
                       :props="defaultProps"
                       @check-change="HandleTreeCheck"
        >

        </tree-select>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
    components: {},
    computed: {
        treeselectwarp() {
          return this.$refs.treeselectwarp;
        }
    },
  data() {
    return {
        treedata:[{
          id: 1,
          label: '一级 1',
          children: [{
            id: 4,
            label: '二级 1-1',
            children: [{
              id: 9,
              label: '三级 1-1-1'
            }, {
              id: 10,
              label: '三级 1-1-2'
            }]
          }]
        }, {
          id: 2,
          label: '一级 2',
          children: [{
            id: 5,
            label: '二级 2-1'
          }, {
            id: 6,
            label: '二级 2-2'
          }]
        }, {
          id: 3,
          label: '一级 3',
          children: [{
            id: 7,
            label: '二级 3-1'
          }, {
            id: 8,
            label: '二级 3-2'
          }]
        }],
        defaultProps:{
          children: 'children',
          label: 'label'
        }
    };
  },
  mounted() {},
  methods: {
    HandleTreeCheck(CheckedKeys){
     
     console.log("CheckedKeys",CheckedKeys);
    }
  }
};
</script>
<style>
.main{
    margin-top:20px;
}
</style>
